import Home from '@/auth/pages/Home'

export default {
  path: '/risk-source-library',
  name: 'risk-source-library',
  meta: {
    icon: 'ios-keypad',
    title: '风险源库'
  },
  component: Home,
  children: [
    {
      path: 'risk-information-labrary',
      name: 'risk-information-labrary',
      meta: {
        title: '风险信息库',
        //keepAlive:true
      },
      component: () => import('@/views/risk-source-library/risk-information-labrary/risk-information-labrary')
    },
    /*{
      //新增/编辑/详情
      path: 'risk-information-labrary/:type/:id/:name',
      name: 'information-add-editor-details',
      meta: {
        title: route => `${route.params.name}`
      },
      component: () => import('@/views/risk-source-library/risk-information-labrary/AddEditorDetails.vue')
    },*/
    {
      //信息库--新增
      path: 'risk-information-labrary-add/:type/:id/:name/:parentId',
      name: 'risk-information-add',
      meta: {
        title: route => `${route.params.name}`,
        notCache: false
      },
      component: () => import('@/views/risk-source-library/risk-information-labrary/add.vue')
    },{
      //信息库--编辑
      path: 'risk-information-labrary-edit/:type/:id/:name',
      name: 'risk-information-edit',
      meta: {
        title: route => `${route.params.name}`,
        notCache: false
      },
      component: () => import('@/views/risk-source-library/risk-information-labrary/edit.vue')
    },{
      //信息库--详情
      path: 'risk-information-labrary/:type/:id/:name',
      name: 'risk-information-detail',
      meta: {
        title: route => `${route.params.name}`,
        notCache: true
      },
      component: () => import('@/views/risk-source-library/risk-information-labrary/detail.vue')
    },
    {
      path: 'measures-library',
      name: 'measures-library',
      meta: {
        title: '措施方案库',
        notCache: false
      },
      component: () => import('@/views/risk-source-library/measures-library/measures-library')
    },
    /*{
      //新增编辑/详情
      path: 'measures-library/:type/:id/:name',
      name: 'measures-add-editor-details',
      meta: {
        title: route => `${route.params.name}`,
      },
      component: () => import('@/views/risk-source-library/measures-library/AddEditorDetails.vue')
    },*/
    {
      //方案库--新增
      path: 'measures-library-add/:type/:id/:name/:measureType/:riskOperationId',
      name: 'measures-library-add',
      meta: {
        title: route => `${route.params.name}`,
        notCache: false
      },
      component: () => import('@/views/risk-source-library/measures-library/add.vue')
    },{
      //方案库--编辑
      path: 'measures-library-edit/:type/:id/:name',
      name: 'measures-library-edit',
      meta: {
        title: route => `${route.params.name}`,
        notCache: false
      },
      component: () => import('@/views/risk-source-library/measures-library/edit.vue')
    },{
      //方案库--详情
      path: 'measures-library/:type/:id/:name',
      name: 'measures-library-detail',
      meta: {
        title: route => `${route.params.name}`,
        notCache: true
      },
      component: () => import('@/views/risk-source-library/measures-library/detail.vue')
    },
  ]
}
